import Event from "./event";

class TouchEvent extends Event {
  static CLICK = "click";
  static TOUCH_START = "touch_start";
  static TOUCH_MOVE = "touch_move";
  static TOUCH_END = "touch_end";
  static SWIPE = "swipe";
  touches = null;
  constructor(t, n, r) {
    super(t, n);
    this.touches = r;
  }
  clone(e) {
    return (
      (e = arguments.length > 0 ? e : this.target),
      new TouchEvent(e, this.type, this.touches.slice(0))
    );
  }
}

export default TouchEvent;
